﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.EventSystems;

namespace Miao.UI
{
    public abstract class DragBase : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
    {
        public static GameObject currentDrag = null;
        public RectTransform rectTransform
        {
            get
            {
                return transform as RectTransform;
            }
        }
        public Canvas renderCanvas { get=>UIManager.mainCanvas; }
        public RectTransform canvasRectTransform { get => UIManager.canvasTransfrom; }
        virtual protected void Awake()
        {
        }
        public abstract void OnBeginDrag(PointerEventData eventData);

        public abstract void OnDrag(PointerEventData eventData);

        public abstract void OnEndDrag(PointerEventData eventData);
    }
}
